<template>
  <div class="item-show">
    <div class="content">
      <div class="box-top">
        <div class="left">
          <img
            v-if="box.boxType == 2 && box.isIotTrust == 0"
            src="../../../assets/images/yq.png"
            fit="fill"
            alt="云窍"
          />
          <img
            v-if="box.boxType == 2 && box.isIotTrust == 1"
            src="../../../assets/images/ant/yq.png"
            fit="fill"
            alt="云窍"
          />

          <img
            v-if="box.boxType == 5 && box.isIotTrust == 0"
            class="dq-box"
            src="../../../assets/images/dq.png"
            fit="fill"
            alt="档案窍"
          />
          <img
            v-if="box.boxType == 5 && box.isIotTrust == 1"
            class="dq-box"
            src="../../../assets/images/ant/dq.png"
            fit="fill"
            alt="档案窍"
          />
        </div>

        <div class="right">
          <div class="box-code">
            {{ box.boxCode }}
          </div>
          <div class="box-code">调阅明细：{{ box.detail }}</div>
          <div class="box-code">窍楚备注：{{ box.extra.remark }}</div>
          <div class="box-code">
            图片数量：{{ box.userBoxFileList && box.userBoxFileList.length }}
          </div>
        </div>
      </div>

      <div class="box-img" v-if="box.userBoxFileList && box.userBoxFileList.length > 0">
        <el-image
          style="width: 100%; height: 200px"
          :src="box.fileList[0]"
          :preview-src-list="box.fileList"
        >
        </el-image>
      </div>
      <div class="bottom">
        <el-button class="btn approve" @click="examine(box, 2)" type="text">通过</el-button>
        <el-button class="btn approve" @click="examine(box, 3)" type="text">驳回</el-button>
        <!-- <div class="btn approve" @click="examine(box, 2)">通过</div> -->
        <!-- <div class="btn reject" @click="examine(box, 3)">驳回</div> -->
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "TakeOrderBox",
  props: {
    box: {
      type: Object,
      default: () => {},
    },
  },
  components: {},
  watch: {},
  data() {
    return {};
  },
  mounted() {},
  methods: {
    // 审核
    examine(box, type) {
      this.$emit("examine", { id: box.id, examineType: type });
    },
  },
};
</script>

<style lang="scss" scoped>
.yellow {
  color: #f88123;
}
.hand {
  cursor: pointer;
}

.item-show {
  width: 100%;
  background-color: #fff;
  border-radius: 20px;
  padding: 10px;

  .content {
    margin: 10px 0 0 0;
    .box-top {
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      .left {
        margin-right: 10px;
        img {
          width: 60px;
        }
      }
      .right {
        .box-code {
          color: #333;
          margin-bottom: 5px;
        }
      }
    }
    .box-img {
      height: 200px;
    }
    .bottom {
      color: #f88123;
      line-height: 20px;
      display: flex;
      margin-top: 10px;
      .btn {
        font-size: 14px;
        font-family: MicrosoftYaHei-Bold;
        width: 50%;
        text-align: center;
        cursor: pointer;
      }
    }
  }
}
</style>
